from flask import Flask, render_template, request
from werkzeug.utils import secure_filename

import os

app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = 'upload/'

@app.route('/upload/')
def upload_file():
	return render_template('upload.html')
	
@app.route('/uploader',methods=['GET', 'POST'])
def loader():
	if request.method == 'POST':
		f = request.files['file1']
		print(request.files)
		f.save(os.path.join(app.config['UPLOAD_FOLDER'],
        secure_filename(f.filename)))
        _path= r'C:\Users\Administrator\Desktop\wjy\upload\{}'.format(f.filename)
        from az import decode
		return decode(_path)
		
`	else:
		return render_template('upload.html')
	
if __name__ == '__main__':
	app.run(host="0.0.0.0",debug=True)